package com.zcxy360.sandtable.domain;

import com.zcxy360.sandtable.domain.StudentUnit;
import com.zcxy360.sandtable.domain.StudentUnitExample;
import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface StudentUnitMapper {
	
//	
	List<StudentUnit> list(@Param("studentUnit") StudentUnit studentUnit,@Param("orderByClause") String orderByClause);
	List<StudentUnit> listWithStageUnitCascade(@Param("studentUnit") StudentUnit studentUnit,@Param("orderByClause") String orderByClause);
	List<StudentUnit> listWithCascade(@Param("studentUnit") StudentUnit studentUnit,@Param("orderByClause") String orderByClause);
	List<StudentUnit> listForCompletion(@Param("courseId") Integer courseId,@Param("userId") Integer userId);
	List<StudentUnit> listByCourseIdAndUserId(@Param("courseId") Integer courseId,@Param("userId") Integer userId);
	void submit(StudentUnit studentUnit);
// 
	
    long countByExample(StudentUnitExample example);

    int deleteByExample(StudentUnitExample example);

    int deleteByPrimaryKey(@Param("courseId") Integer courseId, @Param("userId") Integer userId, @Param("unitId") Integer unitId);

    int insert(StudentUnit record);

    int insertSelective(StudentUnit record);

    List<StudentUnit> selectByExample(StudentUnitExample example);

    StudentUnit selectByPrimaryKey(@Param("courseId") Integer courseId, @Param("userId") Integer userId, @Param("unitId") Integer unitId);

    int updateByExampleSelective(@Param("record") StudentUnit record, @Param("example") StudentUnitExample example);

    int updateByExample(@Param("record") StudentUnit record, @Param("example") StudentUnitExample example);

    int updateByPrimaryKeySelective(StudentUnit record);

    int updateByPrimaryKey(StudentUnit record);
}